﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="CSData" targetNamespace="http://tempuri.org/CSData.xsd" xmlns:mstns="http://tempuri.org/CSData.xsd" xmlns="http://tempuri.org/CSData.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DIAptekaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DIAptekaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.ComparativeSheet.Properties.Settings.GlobalReference.Default.DIAptekaConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="IncorrectDocumentsTableAdapter" GeneratorDataComponentClassName="IncorrectDocumentsTableAdapter" Name="IncorrectDocuments" UserDataComponentName="IncorrectDocumentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>WITH data(count, parent) AS (SELECT     COUNT(Id) AS count, ParentId
                                                               FROM         CA.Documents
                                                               WHERE     (DepartmentId = @depId) AND (DocTypeId = 5)
                                                               GROUP BY ParentId, DocTypeId, DepartmentId
                                                               HAVING      (COUNT(Id) &gt; 1))
    SELECT     d.ParentId, d.Id, d.DepartmentId,
                                (SELECT     COUNT(Id) AS Expr1
                                  FROM          CA.GoodsDocLines AS v
                                  WHERE      (DocId = d.Id)) AS LinesCount, dep.Name, d.DocDate, du.Login AS UserName
     FROM         CA.Documents AS d INNER JOIN
                            CO.Departments AS dep ON dep.Id = d.DepartmentId INNER JOIN
                            CD.DepartmentUsers AS du ON du.Id = d.DepartmentUserId
     WHERE     (d.ParentId IN
                                (SELECT     parent
                                  FROM          data AS data_1))
     ORDER BY d.ParentId</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="depId" ColumnName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@depId" Precision="0" Scale="0" Size="4" SourceColumn="" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DepartmentId" DataSetColumn="DepartmentId" />
              <Mapping SourceColumn="ParentId" DataSetColumn="ParentId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="UserName" DataSetColumn="UserName" />
              <Mapping SourceColumn="LinesCount" DataSetColumn="LinesCount" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartmentsTableAdapter" GeneratorDataComponentClassName="DepartmentsTableAdapter" Name="Departments" UserDataComponentName="DepartmentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DilanOffice.CO.Departments" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT     Id, Name
FROM         CO.Departments
ORDER BY Name</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="BadDocumentsTableAdapter" GeneratorDataComponentClassName="BadDocumentsTableAdapter" Name="BadDocuments" UserDataComponentName="BadDocumentsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="data" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>WITH data(id1, did1, dtid1, dd1, sum1, id2, did2, dtid2, dd2, sum2) AS (SELECT     d1.Id, d1.DepartmentId, d1.DocTypeId, d1.DocDate,
                                                                                                                                                                                   (SELECT     - SUM(RetailSum) AS Expr1
                                                                                                                                                                                     FROM          CA.GoodsDocLines AS v
                                                                                                                                                                                     WHERE      (DocId = d1.Id) AND (Qntty &lt; 0)) AS sum1, d2.Id AS id1, 
                                                                                                                                                                               d2.DepartmentId AS DepartmentId1, d2.DocTypeId AS DocTypeId1, 
                                                                                                                                                                               d2.DocDate AS DocDate2,
                                                                                                                                                                                   (SELECT     SUM(RetailSum) AS Expr1
                                                                                                                                                                                     FROM          CA.GoodsDocLines AS v
                                                                                                                                                                                     WHERE      (DocId = d2.Id) AND (Qntty &gt; 0)) AS sum2
                                                                                                                                                        FROM         CA.Documents AS d1 LEFT OUTER JOIN
                                                                                                                                                                               CA.Documents AS d2 ON d1.Id = d2.ParentId
                                                                                                                                                        WHERE     (d1.DocTypeId = 4) AND (d2.DepartmentId = @depId OR
                                                                                                                                                                               d2.DepartmentId IS NULL))
    SELECT     id1, did1, dtid1, dd1, sum1, id2, did2, dtid2, dd2, sum2
     FROM         data AS data_1
     WHERE     (sum1 &lt;&gt; sum2) OR
                            (sum2 IS NULL)
     ORDER BY id1</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="depId" ColumnName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@depId" Precision="0" Scale="0" Size="4" SourceColumn="" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id1" DataSetColumn="id1" />
              <Mapping SourceColumn="did1" DataSetColumn="did1" />
              <Mapping SourceColumn="dtid1" DataSetColumn="dtid1" />
              <Mapping SourceColumn="dd1" DataSetColumn="dd1" />
              <Mapping SourceColumn="sum1" DataSetColumn="sum1" />
              <Mapping SourceColumn="id2" DataSetColumn="id2" />
              <Mapping SourceColumn="did2" DataSetColumn="did2" />
              <Mapping SourceColumn="dtid2" DataSetColumn="dtid2" />
              <Mapping SourceColumn="dd2" DataSetColumn="dd2" />
              <Mapping SourceColumn="sum2" DataSetColumn="sum2" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DocLinesTableAdapter" GeneratorDataComponentClassName="DocLinesTableAdapter" Name="DocLines" UserDataComponentName="DocLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT     vwGoodsDetailed.FullName, 
                      CASE WHEN CA.GoodsDocLines.RetailSum &gt; 0 THEN CA.GoodsDocLines.RetailSum ELSE - CA.GoodsDocLines.RetailSum END AS RetailSum, 
                      CASE WHEN CA.GoodsDocLines.Qntty &gt; 0 THEN CA.GoodsDocLines.Qntty ELSE - CA.GoodsDocLines.Qntty END AS Qntty, CD.Parties.BarCode
FROM         CA.Documents INNER JOIN
                      CA.GoodsDocLines INNER JOIN
                      vwGoodsDetailed INNER JOIN
                      CD.Parties ON vwGoodsDetailed.Id = CD.Parties.GoodsId ON CA.GoodsDocLines.PartyId = CD.Parties.Id AND 
                      CA.GoodsDocLines.PartyId = CD.Parties.Id ON CA.Documents.Id = CA.GoodsDocLines.DocId AND CA.Documents.Id = CA.GoodsDocLines.DocId
WHERE     (CA.Documents.Id = @docId)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="docId" ColumnName="Id" DataSourceName="DilanOffice.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@docId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="FullName" DataSetColumn="FullName" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="BarCode" DataSetColumn="BarCode" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="CSData" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="CSData" msprop:Generator_DataSetName="CSData">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="IncorrectDocuments" msprop:Generator_UserTableName="IncorrectDocuments" msprop:Generator_RowDeletedName="IncorrectDocumentsRowDeleted" msprop:Generator_RowChangedName="IncorrectDocumentsRowChanged" msprop:Generator_RowClassName="IncorrectDocumentsRow" msprop:Generator_RowChangingName="IncorrectDocumentsRowChanging" msprop:Generator_RowEvArgName="IncorrectDocumentsRowChangeEvent" msprop:Generator_RowEvHandlerName="IncorrectDocumentsRowChangeEventHandler" msprop:Generator_TableClassName="IncorrectDocumentsDataTable" msprop:Generator_TableVarName="tableIncorrectDocuments" msprop:Generator_RowDeletingName="IncorrectDocumentsRowDeleting" msprop:Generator_TablePropName="IncorrectDocuments">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DepartmentId" msdata:ReadOnly="true" msprop:Generator_UserColumnName="DepartmentId" msprop:Generator_ColumnPropNameInRow="DepartmentId" msprop:Generator_ColumnVarNameInTable="columnDepartmentId" msprop:Generator_ColumnPropNameInTable="DepartmentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ParentId" msprop:Generator_UserColumnName="ParentId" msprop:Generator_ColumnPropNameInRow="ParentId" msprop:Generator_ColumnVarNameInTable="columnParentId" msprop:Generator_ColumnPropNameInTable="ParentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="UserName" msprop:Generator_UserColumnName="UserName" msprop:Generator_ColumnPropNameInRow="UserName" msprop:Generator_ColumnVarNameInTable="columnUserName" msprop:Generator_ColumnPropNameInTable="UserNameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="LinesCount" msdata:ReadOnly="true" msprop:Generator_UserColumnName="LinesCount" msprop:Generator_ColumnPropNameInRow="LinesCount" msprop:Generator_ColumnVarNameInTable="columnLinesCount" msprop:Generator_ColumnPropNameInTable="LinesCountColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Departments" msprop:Generator_UserTableName="Departments" msprop:Generator_RowDeletedName="DepartmentsRowDeleted" msprop:Generator_RowChangedName="DepartmentsRowChanged" msprop:Generator_RowClassName="DepartmentsRow" msprop:Generator_RowChangingName="DepartmentsRowChanging" msprop:Generator_RowEvArgName="DepartmentsRowChangeEvent" msprop:Generator_RowEvHandlerName="DepartmentsRowChangeEventHandler" msprop:Generator_TableClassName="DepartmentsDataTable" msprop:Generator_TableVarName="tableDepartments" msprop:Generator_RowDeletingName="DepartmentsRowDeleting" msprop:Generator_TablePropName="Departments">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="BadDocuments" msprop:Generator_UserTableName="BadDocuments" msprop:Generator_RowDeletedName="BadDocumentsRowDeleted" msprop:Generator_RowChangedName="BadDocumentsRowChanged" msprop:Generator_RowClassName="BadDocumentsRow" msprop:Generator_RowChangingName="BadDocumentsRowChanging" msprop:Generator_RowEvArgName="BadDocumentsRowChangeEvent" msprop:Generator_RowEvHandlerName="BadDocumentsRowChangeEventHandler" msprop:Generator_TableClassName="BadDocumentsDataTable" msprop:Generator_TableVarName="tableBadDocuments" msprop:Generator_RowDeletingName="BadDocumentsRowDeleting" msprop:Generator_TablePropName="BadDocuments">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id1" msprop:Generator_UserColumnName="id1" msprop:Generator_ColumnPropNameInRow="id1" msprop:Generator_ColumnVarNameInTable="columnid1" msprop:Generator_ColumnPropNameInTable="id1Column" type="xs:int" />
              <xs:element name="did1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="did1" msprop:Generator_ColumnPropNameInRow="did1" msprop:Generator_ColumnVarNameInTable="columndid1" msprop:Generator_ColumnPropNameInTable="did1Column" type="xs:int" minOccurs="0" />
              <xs:element name="dtid1" msprop:Generator_UserColumnName="dtid1" msprop:Generator_ColumnPropNameInRow="dtid1" msprop:Generator_ColumnVarNameInTable="columndtid1" msprop:Generator_ColumnPropNameInTable="dtid1Column" type="xs:int" />
              <xs:element name="dd1" msprop:Generator_UserColumnName="dd1" msprop:Generator_ColumnPropNameInRow="dd1" msprop:Generator_ColumnVarNameInTable="columndd1" msprop:Generator_ColumnPropNameInTable="dd1Column" type="xs:dateTime" />
              <xs:element name="sum1" msdata:ReadOnly="true" msprop:Generator_UserColumnName="sum1" msprop:Generator_ColumnPropNameInRow="sum1" msprop:Generator_ColumnVarNameInTable="columnsum1" msprop:Generator_ColumnPropNameInTable="sum1Column" type="xs:decimal" minOccurs="0" />
              <xs:element name="id2" msprop:Generator_UserColumnName="id2" msprop:Generator_ColumnPropNameInRow="id2" msprop:Generator_ColumnVarNameInTable="columnid2" msprop:Generator_ColumnPropNameInTable="id2Column" type="xs:int" minOccurs="0" />
              <xs:element name="did2" msprop:Generator_UserColumnName="did2" msprop:Generator_ColumnPropNameInRow="did2" msprop:Generator_ColumnVarNameInTable="columndid2" msprop:Generator_ColumnPropNameInTable="did2Column" type="xs:int" minOccurs="0" />
              <xs:element name="dtid2" msprop:Generator_UserColumnName="dtid2" msprop:Generator_ColumnPropNameInRow="dtid2" msprop:Generator_ColumnVarNameInTable="columndtid2" msprop:Generator_ColumnPropNameInTable="dtid2Column" type="xs:int" minOccurs="0" />
              <xs:element name="dd2" msprop:Generator_UserColumnName="dd2" msprop:Generator_ColumnPropNameInRow="dd2" msprop:Generator_ColumnVarNameInTable="columndd2" msprop:Generator_ColumnPropNameInTable="dd2Column" type="xs:dateTime" minOccurs="0" />
              <xs:element name="sum2" msprop:Generator_UserColumnName="sum2" msprop:Generator_ColumnPropNameInRow="sum2" msprop:Generator_ColumnVarNameInTable="columnsum2" msprop:Generator_ColumnPropNameInTable="sum2Column" type="xs:decimal" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DocLines" msprop:Generator_UserTableName="DocLines" msprop:Generator_RowDeletedName="DocLinesRowDeleted" msprop:Generator_TableClassName="DocLinesDataTable" msprop:Generator_RowChangedName="DocLinesRowChanged" msprop:Generator_RowClassName="DocLinesRow" msprop:Generator_RowChangingName="DocLinesRowChanging" msprop:Generator_RowEvArgName="DocLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="DocLinesRowChangeEventHandler" msprop:Generator_TablePropName="DocLines" msprop:Generator_TableVarName="tableDocLines" msprop:Generator_RowDeletingName="DocLinesRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="FullName" msdata:ReadOnly="true" msprop:Generator_UserColumnName="FullName" msprop:Generator_ColumnPropNameInRow="FullName" msprop:Generator_ColumnVarNameInTable="columnFullName" msprop:Generator_ColumnPropNameInTable="FullNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailSum" msdata:ReadOnly="true" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Qntty" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="BarCode" msprop:Generator_UserColumnName="BarCode" msprop:Generator_ColumnPropNameInRow="BarCode" msprop:Generator_ColumnVarNameInTable="columnBarCode" msprop:Generator_ColumnPropNameInTable="BarCodeColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:IncorrectDocuments" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Departments_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Departments" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>